package com.liaoban.app.exception;

import com.liaoban.app.api.UnMixable;

/**
 * Created by 56407 on 2017/10/1.
 * 自定义异常
 */

public class AppException extends RuntimeException implements UnMixable {
    public static int NONE_NETWORK_CODE = -1;
    public static int REQUEST_UNKNOWN_ERROR_CODE = -2;
    private int code;
    private String msg;

    public AppException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static AppException createCustomAppException(int code, String message) {
        return new AppException(code, message);
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
